package com.hxht.storage.server.pojo;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
//@Table(schema="storage")
public class PlanRecordInfo extends BaseRecordInfo {
	
	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	private WeekTemplateInfo weekTemplate;

	/** 录像保存的最长时间，单位：天。<br/>
     * 超过这个时间，该录像文件将被强制删除；若设置为0天则不强制删除，除非文件被循环覆盖
     * 
     */
    private Integer recordDuration;

    /** 是否冗余录像（重要数据双备份）：<br/>
     * 0-不录像，1-录像
     */
    private Boolean isRedundancy = false;

    /** 录像时复合流编码时是否记录音频数据：<br/>
     * 0-不记录，1-记录 
     * 默认记录音频数据
     */
    private Boolean isAudioRecord = true;

    /** 录像是否存档 <br/>
     * 0- 录像不存档，1- 录像存档，目前定时录像不存档 
     */
    private Boolean isArchive = false; 

    /** 录像锁定时长，单位：小时 <br/>
     * 0表示不锁定，0xffff表示永久锁定。<br/>
     * 录像段的时长大于锁定的持续时长的录像，将不会锁定
     */
    private Integer lockDuration = 0;
    
    /**  预录时间：0-不预录，1-5秒，2-10秒，3-15秒，4-20秒，5-25秒，6-30秒，7-0xffffffff(尽可能预录)  */
    private Integer preRecordTime;  

    /** // 录象延时时间，0-5秒， 1-10秒， 2-30秒， 3-1分钟， 4-2分钟， 5-5分钟， 6-10分钟 */
    private Integer postRecordTime; 
    
    /** 码流类型，0-主码流，1-子码流，2-第三码流 */
    private Integer streamType; 
	
	public PlanRecordInfo(){}
	
	 public Integer getPreRecordTime() {
		return preRecordTime;
	}

	public void setPreRecordTime(Integer preRecordTime) {
		this.preRecordTime = preRecordTime;
	}

	public Integer getPostRecordTime() {
		return postRecordTime;
	}

	public void setPostRecordTime(Integer postRecordTime) {
		this.postRecordTime = postRecordTime;
	}

	public Integer getStreamType() {
		return streamType;
	}

	public void setStreamType(Integer streamType) {
		this.streamType = streamType;
	}

	public Boolean getIsRedundancy() {
		return isRedundancy;
	}

	public Boolean getIsAudioRecord() {
		return isAudioRecord;
	}

	public Boolean getIsArchive() {
		return isArchive;
	}

	public void setWeekTemplate(WeekTemplateInfo weekTemplate) {
		this.weekTemplate = weekTemplate;
	}
	
	public Integer getRecordDuration() {
		return recordDuration;
	}

	public void setRecordDuration(Integer recordDuration) {
		this.recordDuration = recordDuration;
	}

	public Boolean isRedundancy() {
		return isRedundancy;
	}

	public void setIsRedundancy(Boolean isRedundancy) {
		this.isRedundancy = isRedundancy;
	}

	public Boolean isAudioRecord() {
		return isAudioRecord;
	}

	public void setIsAudioRecord(Boolean isAudioRecord) {
		this.isAudioRecord = isAudioRecord;
	}

	public Boolean isArchive() {
		return isArchive;
	}

	public void setIsArchive(Boolean isArchive) {
		this.isArchive = isArchive;
	}

	public Integer getLockDuration() {
		return lockDuration;
	}

	public void setLockDuration(Integer lockDuration) {
		this.lockDuration = lockDuration;
	}

	public WeekTemplateInfo getWeekTemplate() {
		return weekTemplate;
	}

}
